.class Lcn/domob/android/ads/u$2;
.super Ljava/lang/Object;
.source "SourceFile"

# interfaces
.implements Landroid/webkit/DownloadListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcn/domob/android/ads/u;->g()Landroid/webkit/WebView;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic a:Lcn/domob/android/ads/u;


# direct methods
.method constructor <init>(Lcn/domob/android/ads/u;)V
    .locals 0

    iput-object p1, p0, Lcn/domob/android/ads/u$2;->a:Lcn/domob/android/ads/u;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onDownloadStart(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;J)V
    .locals 6

    const/4 v5, -0x1

    const-string v0, "."

    invoke-virtual {p1, v0}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I

    move-result v0

    invoke-virtual {p1, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    invoke-static {}, Lcn/domob/android/ads/u;->b()Lcn/domob/android/ads/H;

    move-result-object v1

    iget-object v2, p0, Lcn/domob/android/ads/u$2;->a:Lcn/domob/android/ads/u;

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "----on Download start:"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Lcn/domob/android/ads/H;->a(Ljava/lang/Object;Ljava/lang/String;)V

    invoke-static {}, Lcn/domob/android/ads/u;->c()[Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;

    move-result-object v1

    invoke-interface {v1, v0}, Ljava/util/List;->contains(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1

    new-instance v0, Landroid/app/Dialog;

    iget-object v1, p0, Lcn/domob/android/ads/u$2;->a:Lcn/domob/android/ads/u;

    invoke-static {v1}, Lcn/domob/android/ads/u;->e(Lcn/domob/android/ads/u;)Landroid/content/Context;

    move-result-object v1

    const v2, 0x1030007

    invoke-direct {v0, v1, v2}, Landroid/app/Dialog;-><init>(Landroid/content/Context;I)V

    new-instance v1, Lcn/domob/android/ads/u$2$1;

    invoke-direct {v1, p0}, Lcn/domob/android/ads/u$2$1;-><init>(Lcn/domob/android/ads/u$2;)V

    invoke-virtual {v0, v1}, Landroid/app/Dialog;->setOnDismissListener(Landroid/content/DialogInterface$OnDismissListener;)V

    new-instance v1, Landroid/widget/VideoView;

    iget-object v2, p0, Lcn/domob/android/ads/u$2;->a:Lcn/domob/android/ads/u;

    invoke-static {v2}, Lcn/domob/android/ads/u;->e(Lcn/domob/android/ads/u;)Landroid/content/Context;

    move-result-object v2

    invoke-direct {v1, v2}, Landroid/widget/VideoView;-><init>(Landroid/content/Context;)V

    invoke-static {p1}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/VideoView;->setVideoURI(Landroid/net/Uri;)V

    new-instance v2, Landroid/widget/MediaController;

    iget-object v3, p0, Lcn/domob/android/ads/u$2;->a:Lcn/domob/android/ads/u;

    invoke-static {v3}, Lcn/domob/android/ads/u;->e(Lcn/domob/android/ads/u;)Landroid/content/Context;

    move-result-object v3

    invoke-direct {v2, v3}, Landroid/widget/MediaController;-><init>(Landroid/content/Context;)V

    invoke-virtual {v1, v2}, Landroid/widget/VideoView;->setMediaController(Landroid/widget/MediaController;)V

    new-instance v2, Lcn/domob/android/ads/u$2$2;

    invoke-direct {v2, p0}, Lcn/domob/android/ads/u$2$2;-><init>(Lcn/domob/android/ads/u$2;)V

    invoke-virtual {v1, v2}, Landroid/widget/VideoView;->setOnErrorListener(Landroid/media/MediaPlayer$OnErrorListener;)V

    new-instance v2, Lcn/domob/android/ads/u$2$3;

    invoke-direct {v2, p0, v0}, Lcn/domob/android/ads/u$2$3;-><init>(Lcn/domob/android/ads/u$2;Landroid/app/Dialog;)V

    invoke-virtual {v1, v2}, Landroid/widget/VideoView;->setOnCompletionListener(Landroid/media/MediaPlayer$OnCompletionListener;)V

    new-instance v2, Landroid/widget/RelativeLayout;

    iget-object v3, p0, Lcn/domob/android/ads/u$2;->a:Lcn/domob/android/ads/u;

    invoke-static {v3}, Lcn/domob/android/ads/u;->e(Lcn/domob/android/ads/u;)Landroid/content/Context;

    move-result-object v3

    invoke-direct {v2, v3}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;)V

    const/high16 v3, -0x100

    invoke-virtual {v2, v3}, Landroid/widget/RelativeLayout;->setBackgroundColor(I)V

    new-instance v3, Landroid/widget/RelativeLayout$LayoutParams;

    invoke-direct {v3, v5, v5}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v2, v3}, Landroid/widget/RelativeLayout;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    new-instance v3, Landroid/widget/RelativeLayout$LayoutParams;

    invoke-direct {v3, v5, v5}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    const/16 v4, 0xd

    invoke-virtual {v3, v4}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    invoke-virtual {v2, v1, v3}, Landroid/widget/RelativeLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    invoke-virtual {v0, v2}, Landroid/app/Dialog;->setContentView(Landroid/view/View;)V

    invoke-virtual {v0}, Landroid/app/Dialog;->show()V

    invoke-virtual {v1}, Landroid/widget/VideoView;->start()V

    invoke-virtual {v1}, Landroid/widget/VideoView;->requestFocus()Z

    :cond_0
    :goto_0
    return-void

    :cond_1
    iget-object v0, p0, Lcn/domob/android/ads/u$2;->a:Lcn/domob/android/ads/u;

    invoke-static {v0}, Lcn/domob/android/ads/u;->c(Lcn/domob/android/ads/u;)Lcn/domob/android/ads/u$b;

    move-result-object v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcn/domob/android/ads/u$2;->a:Lcn/domob/android/ads/u;

    invoke-static {v0}, Lcn/domob/android/ads/u;->c(Lcn/domob/android/ads/u;)Lcn/domob/android/ads/u$b;

    move-result-object v0

    iget-object v1, p0, Lcn/domob/android/ads/u$2;->a:Lcn/domob/android/ads/u;

    invoke-static {v1}, Lcn/domob/android/ads/u;->f(Lcn/domob/android/ads/u;)Ljava/lang/String;

    move-result-object v1

    invoke-interface {v0, p1, v1}, Lcn/domob/android/ads/u$b;->a(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0
.end method
